﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Tasks;
using MTGScore_Cards.Resources;

namespace MTGScore_Cards
{
    public partial class CreditsPage : PhoneApplicationPage
    {
        public CreditsPage()
        {
            InitializeComponent();
        }

        private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
        {
            Developers_Area.Text = Strings.Developer + "Francesco Boscariol";
            Counselor_Area.Text = Strings.Counselor + "Luca Bertani";
            Version_Area.Text = Strings.Version + (App.isTrial() ? "Trial" : "1.6");
            if(App.isTrial())
            {
                Suggestion_Area.Visibility = System.Windows.Visibility.Collapsed;
                Suggestion_Button.Visibility = System.Windows.Visibility.Collapsed;
            }
        }

        private void Suggestion_Button_Click(object sender, RoutedEventArgs e)
        {
            EmailComposeTask etc = new EmailComposeTask();
            etc.Subject = Strings.Title + " - " + Strings.Suggestion;
            etc.To = "boscariol.francesco@gmail.com";
            etc.Show();
        }
    }
}